#!/usr/bin/env python
# coding=utf8
# Last Change: 2010-03-09 22:07:28

from google.appengine.ext import db

class Account(db.Model):
  name = db.StringProperty(required=True)
  gtalk = db.StringProperty(required=True)
  online = db.BooleanProperty(required=True)
  last_leave = db.DateTimeProperty()

class AccessPoint(db.Model):
  user = db.ReferenceProperty(required=True)
  ap = db.StringProperty(required=True)
  tag = db.StringProperty()
  to = db.StringListProperty()

class Message(db.Model):
  sender = db.StringProperty(required=True)
  to = db.StringListProperty()
  tag = db.StringProperty()
  content = db.TextProperty(required=True)
  time = db.DateTimeProperty(required=True)
  
class DelayedMessage(db.Model):
  user = db.StringProperty(required=True)
  message = db.ReferenceProperty(required=True)
  time = db.DateTimeProperty(required=True)

